<div class="hbe_booking_pages">
    
    
    
    <ul class="booking_trail">
        <li class="booking_trail_complete"><a href="/hotels/hotel_results.php?sid=<?=session_id()?>">Results</a></li>
        <li class="booking_trail_current">Booking Details</li>
        <li>Secure Payment</li>
        <li>Booked!</li>
    </ul>
    
   
<h2>Booking Details</h2>


<?php
if($GLOBALS['note']){
	echo display_message($GLOBALS['note']);
}
?>

<article>
        
<form method="post" id="booking_details">

    <div id="errorList" class='message message_neg'>
        <p>There was a problem with the form</p>
    </div>    
    
<input type="hidden" name="action" value="validate" />


    <? // Guest 2....   ?>
<?php foreach ( $_SESSION['booking']['room_ids'] as $keyRoom => $value):
        $child = $_SESSION['booking']['hotel']['room_sets'][$keyRoom]['children'];
        $adult = $_SESSION['booking']['hotel']['room_sets'][$keyRoom]['adults']; ?>
        <h3>Room <?=$keyRoom?></h3>
        
        
        
            <label class="guest_label_title">Title</label>
            <label class="guest_label_first">First Name</label>
            <label class="guest_label_last">Last Name</label>
        
        
        
<?php for ($index = 1; $index <=$adult; $index++): 
    $title_room = 'title_room_' .$keyRoom.'_adults_'.$index;
    $lead_first_name = 'lead_first_name_room_'.$keyRoom .'_adults_' .$index;
    $lead_last_name = 'lead_last_name_room_' . $keyRoom .'_adults_' .$index;
?>
        
        <div class="guest_row">
                <?php if($keyRoom == 1 && $index == 1): ?>
                <h4>Lead Guest</h4> 
                <? endif ?>
                <?php if($index > 1 || $keyRoom > 1): ?>
                <h4>Guest <?=$index?></h4> 
                <? endif ?>
                
                
                    <div class="row_col_title">
                        <select name="<?=$title_room ?>" class='required' >
                            <?php $titles = array('Mr.','Mrs.','Miss'); ?>
                            <?php foreach ($titles as $t): ?>
                                <option value="<?=$t?>" <?=$_SESSION['booking']['details'][$title_room]==$t?'selected="selected"':''?>><?=$t?></option>
                            <?php endforeach; ?>
                        </select>
                    </div>

                    <div class="row_col_first_name">
                        <input type="text" name="<?=$lead_first_name?>" value="<?= $_SESSION['booking']['details'][$lead_first_name] ?>" 
                              class='required' /> 
                    </div>

                    <div class="row_col_last_name">
                        <input type="text" name="<?=$lead_last_name ?>" value="<?= $_SESSION['booking']['details'][$lead_last_name] ?>" class='required'  />
                    </div>

        </div>

           <?php endfor ?>

            <?php for ($i = 1; $i <=$child; $i++): 
                $title_room_child = 'title_room_' . $keyRoom .'_children_' . $i ;
                $lead_first_name = 'lead_first_name_room_' . $keyRoom .'_children_' . $i;  
                $lead_last_name = 'lead_last_name_room_' .$keyRoom . '_children_' .$i;
                //$ageName = 'age_room_' .$keyRoom . '_children_' .$i;
            ?>
        <div class="guest_row">
                <h4>Child <?=$i?></h4> 


                    <div class="row_col_title">
                        <select name="<?=$title_room_child ?>" class='required'>
                            <?php $titles = array('Mr.','Mrs.','Miss'); ?>
                            <?php foreach ($titles as $t): ?>
                                <option value="<?=$t?>" <?=$_SESSION['booking']['details'][$title_room_child]==$t?'selected="selected"':''?>><?=$t?></option>
                            <?php endforeach; ?>
                        </select>
                    </div>

                    <div class="row_col_first_name">
                        <input type="text" name="<?=$lead_first_name ?>" value="<?= $_SESSION['booking']['details'][$lead_first_name] ?>" class='required'/> 
                    </div>

                    <div class="row_col_last_name">
                        <input type="text" name="<?=$lead_last_name ?>" value="<?= $_SESSION['booking']['details'][$lead_last_name] ?>" class='required' />
                    </div>
                    
    <!--                
                    <div class="row_col_title">
                        <label>Age</label>
                        <select name="<?=$ageName ?>" class='required' >
                            <option value=""></option>
                            <?php $ages = array('1','2','3', '4', '5', '6', '7', '8', '9', '10', '11'); ?>
                            <?php foreach ($ages as $age): ?>
                                <option value="<?=$age?>" <?=$_SESSION['booking']['details'][$ageName]==$t?'selected="selected"':''?>><?=$age?></option>
                            <?php endforeach; ?>
                        </select>
                    </div>                    
 -->
                </div>

           <?php endfor?>                
                
                
      <?php endforeach?>
                


<h3>Contact Details</h3>


    
<p>

    <div class="row_col_std">
        <label>Email Address</label>
        <input type="text" name="lead_epost1" id="lead_epost1" value="<?= $_SESSION['booking']['details']['lead_epost1'] ?>"/>
    </div>
    <div class="note_col"><p>We’ll send you a confirmation email</p></div>

</p>   
    
    
<p>

    <div class="row_col_std">
        <label>Re-enter Email Address</label>
        <input type="text" name="lead_epost2" value="<?= $_SESSION['booking']['details']['lead_epost2'] ?>"  />
    </div>

</p>
    
     
<p>

    <div class="row_col_std">
        <label>Contact Telephone</label>
        <input type="text" name="lead_telephone" value="<?= $_SESSION['booking']['details']['lead_telephone'] ?>"   />
    </div>
    <div class="note_col"><p>So the hotel can reach you</p></div>

</p>
    
    
<p>

    <div class="row_col_special">
        
        <label>Special Request for Accommodation 
            <span class="clip_arrow_expand">
                <a href="#">
                    <img src="/images/pixel.gif" alt="" class="clip pos-up" id="special_request_toggle_img" />
                </a>
            </span>
        </label>
        
        <textarea name="special_requirements" id="special_requirements" class="special_request_toggle"><?= $_SESSION['booking']['details']['special_requirements'] ?></textarea>
        
    </div>
    <div class="note_col note_col_special"><p>Please note requests cannot be guaranteed</p></div>

</p>


        
    <p class="hbe_form_term_signup"><input type="checkbox" name="subscribe" class="hbe_form_checkbox_inline" /> Check this box if you would not like to receive our special deals email newsletter that contains great hotel promotions.</p>
    
    <span class="hbe_button_cont"><a class="butt_oran submit">Submit</a></span>
    
    
</form>
    

</article>

<!-- Start booking details -->
<? include SITE_ROOT_PATH."/_lib/html/booking_holiday_details.php"; ?>



    <div id="error"class="error"></div>
</div>
